package de.jonasblatt.networkapi.rpi.network.commands.client;

import de.jonasblatt.networkapi.rpi.model.RpiWorker;
import de.jonasblatt.networkapi.rpi.network.commands.ClientCommand;
import de.jonasblatt.networkapi.rpi.network.server.Server;

public class CCSetGpioOn implements ClientCommand {

	private int clientId;
	private String gpio;

	public CCSetGpioOn(int clientId, String gpio) {
		this.clientId = clientId;
		this.gpio = gpio;
	}

	@Override
	public void execute(Server server) {
		RpiWorker rpiWorker = (RpiWorker) server.getModel();
		rpiWorker.getGpioworker().setGpioOn(this.gpio);
	}
}
